import 'package:flutter_test/flutter_test.dart';
import 'package:component_httpdns/component_httpdns.dart';
import 'package:component_httpdns/component_httpdns_platform_interface.dart';
import 'package:component_httpdns/component_httpdns_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockComponentHttpdnsPlatform
    with MockPlatformInterfaceMixin
    implements ComponentHttpdnsPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final ComponentHttpdnsPlatform initialPlatform = ComponentHttpdnsPlatform.instance;

  test('$MethodChannelComponentHttpdns is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelComponentHttpdns>());
  });

  test('getPlatformVersion', () async {
    ComponentHttpdns componentHttpdnsPlugin = ComponentHttpdns();
    MockComponentHttpdnsPlatform fakePlatform = MockComponentHttpdnsPlatform();
    ComponentHttpdnsPlatform.instance = fakePlatform;

    expect(await componentHttpdnsPlugin.getPlatformVersion(), '42');
  });
}
